package com.dq.service.goods;

import com.dq.exception.customException.AdminException;
import com.dq.controller.in.goods.BossGoodsQuery;
import com.dq.controller.in.goods.stock.OrgGoodsAndStockQuery;
import com.dq.vo.Vo;
import com.dq.domain.goods.Goods;
import com.dq.domain.goods.Product;

import java.util.List;

/**
 * @Author luchangtong
 * @Date 2019/12/7 10:07
 */
public interface GoodsService {

    List<Goods> list(BossGoodsQuery query);
    Long count(BossGoodsQuery query);

    public List<Goods> goodsByOrgList(OrgGoodsAndStockQuery orgGoodsStockQuery, Long orgId) throws AdminException;
    /**
     * 获取商品（goods）列表， 携带库存
     */
    public List<Goods> goodsByOrgAndStockList(OrgGoodsAndStockQuery orgGoodsStockQuery, Long orgId, Boolean deleted) throws AdminException;
    public Long goodsByOrgCount(OrgGoodsAndStockQuery orgGoodsStockQuery, Long orgId, Boolean deleted) throws AdminException;
    /**
     * 获取商品（product）列表， 携带库存, 区别 goods
     */
    public List<Product> productAndStockList(OrgGoodsAndStockQuery orgGoodsStockQuery, Long orgId, Boolean deleted) throws AdminException;
    public Long productAndStockCount(OrgGoodsAndStockQuery orgGoodsStockQuery, Long orgId, Boolean deleted) throws AdminException;

    /**
     * 获取 单个 goods 库存
     */
    public Long goodsStock(Long goodsId, Long orgId) throws AdminException;
    /**
     * 获取 单个 product 库存
     */
    public Long productStock(Long productId, Long orgId) throws AdminException;

    public void deleteGoods(Long goodsId) throws AdminException;

    public Goods initObject(Goods goods) throws AdminException;
}
